package org.ehe.finance.voucher.domain.vo;

import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.ehe.finance.voucher.domain.ErpFinanceVoucherDetail;

import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * 记账凭证明细视图对象
 * @author :zhangnn
 * @className :ErpFinanceVoucherDetailVo
 * @description: TODO
 * @date 2025-08-25 13:15:02
 */
@Data
@AutoMapper(target = ErpFinanceVoucherDetail.class)
public class ErpFinanceVoucherDetailVo {
    @Schema(description = "凭证明细ID")
    private Long id;

    @Schema(description = "凭证主表ID")
    private Long voucherId;

    @Schema(description = "凭证号")
    private String voucherNo;

    @Schema(description = "分录号")
    private Integer entryNo;

    @Schema(description = "会计科目ID")
    private Long subjectId;

    @Schema(description = "会计科目编码")
    private String subjectCode;

    @Schema(description = "会计科目名称")
    private String subjectName;

    @Schema(description = "科目级次")
    private Integer subjectLevel;

    @Schema(description = "摘要")
    private String abstractInfo;

    @Schema(description = "借方金额")
    private BigDecimal debitAmount;

    @Schema(description = "贷方金额")
    private BigDecimal creditAmount;

    @Schema(description = "客户ID(辅助核算)")
    private Long customerId;

    @Schema(description = "客户名称")
    private String customerName;

    @Schema(description = "供应商ID(辅助核算)")
    private Long supplierId;

    @Schema(description = "供应商名称")
    private String supplierName;

    @Schema(description = "员工ID(辅助核算)")
    private Long employeeId;

    @Schema(description = "员工姓名")
    private String employeeName;

    @Schema(description = "项目ID(辅助核算)")
    private Long projectId;

    @Schema(description = "项目名称")
    private String projectName;

    @Schema(description = "部门ID(辅助核算)")
    private Long departmentId;

    @Schema(description = "部门名称")
    private String departmentName;

    @Schema(description = "币种ID")
    private Long currencyId;

    @Schema(description = "币种代码")
    private String currencyCode;

    @Schema(description = "币种名称")
    private String currencyName;

    @Schema(description = "汇率")
    private BigDecimal exchangeRate;

    @Schema(description = "外币借方金额")
    private BigDecimal foreignDebit;

    @Schema(description = "外币贷方金额")
    private BigDecimal foreignCredit;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "创建人姓名")
    private String createByName;

    @Schema(description = "更新人姓名")
    private String updateByName;

    @Schema(description = "方向标识")
    private String direction; // 借/贷

    @Schema(description = "金额")
    private BigDecimal amount; // 借方或贷方金额

    @Schema(description = "外币金额")
    private BigDecimal foreignAmount; // 外币借方或贷方金额
}
